package com.example.teesystem.controller;


import com.example.teesystem.common.utils.Response;
import com.example.teesystem.entity.WebLog;
import com.example.teesystem.entityDto.LogSelect;
import com.example.teesystem.service.LogService;
import lombok.RequiredArgsConstructor;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;
import java.util.Map;

@RestController
@RequestMapping(value = "/tee/webLog",produces = "application/json; charset = utf-8")
@RequiredArgsConstructor
@Validated
public class LogController {
    private final LogService logService;

    @PostMapping("/search")
    public Response search(@RequestBody(required = false)LogSelect log){
        return logService.search(log);
    }

}
